﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Permissions;
using System.Security;

namespace Business.ApplicationSecurity
{
    public class Analyze_Granted_Permissions
    {
        public static void Check()
        {
            FileIOPermission filePermision = new FileIOPermission(FileIOPermissionAccess.Read, @"C:\Windows\");

            if (SecurityManager.IsGranted(filePermision))
                Console.WriteLine("FileIOPermission is granted !");
            else
                Console.WriteLine("FileIOPermission is NOT granted !");

        }
    }
}
